.danmu-container {
  position: absolute;
  top: 50%; /* 让容器在垂直方向上居中 */
  transform: translateY(-50%); /* 向上移动自身高度的一半，实现精确居中 */
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1; /* 设置较高的层级，确保在视频上方 */
}

.danmu-item {
  position: absolute;
  white-space: nowrap;
  animation: danmu-move 10s linear infinite;
  color: white;
  font-size: 16px;
  text-shadow: 1px 1px 2px black;
  /* 可以根据需要添加更多样式，比如水平方向的起始位置等 */
  left: 100%; /* 从屏幕右侧开始 */
}

@keyframes danmu-move {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}
.danmu-input-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.danmu-input-container input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 10px;
  width: 200px;
}

.danmu-input-container button {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.danmu-input-container button:hover {
  background-color: #0056b3;
}